package jp.co.cos.ittrick.channel.controller.admin;

import java.util.List;

import jp.co.cos.ittrick.channel.model.ChannelModel;
import jp.co.cos.ittrick.channel.service.ChannelService;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

/**
 * チャンネルリスト
 * @author takahara
 *
 */
public class IndexController extends Controller {

    private ChannelService channelService;

    public IndexController() {
        channelService = new ChannelService();
    }

    @Override
    public Navigation run() throws Exception {

        List<ChannelModel> channelList = channelService.getAll();
        requestScope("channelList", channelList);

        return forward("index.jsp");
    }
}
